<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">




    <ui:composition>
        <h:form style="text-align: center; font-size: 90%;" id="frm1">
            <f:view locale="#{locale.locale}" >
                <p:accordionPanel dynamic="true" cache="true" style="margin-top: 40px;" >  
                    <p:tab title="#{trans.previewPages}" closable="true">  
                        <h:panelGrid columns="1" >  
                            
                            <c:forEach items="#{reader.thumbnail}" var="item"  varStatus="status">
                            
                                <h:commandButton styleClass="button" image="#{item}" style="width: 93%;"
                                                 >
                                    <f:ajax listener="#{viewer.gotoPage(status.index+1)}" render="@form :topForm :imageForm" />
                                    
                                </h:commandButton>
                                <h:outputText value="#{status.index+1}" />

                            </c:forEach>

                        </h:panelGrid>  
                    </p:tab>  
                    <p:tab title="#{trans.notes}">  
                        <h:panelGrid columns="1" >  
                            <h:outputText value="Lorem Ipsum" />  
                        </h:panelGrid>  
                    </p:tab>  
                </p:accordionPanel>  



            </f:view>
        </h:form>
    </ui:composition>

</html>

